// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
//
// $Id: day_counter.hpp 225 2008-09-12 17:43:02Z heavyzheng $
//

#ifndef ZZHENG_QUANT_DATES_DAY_COUNTER_HPP_20080808__
#define ZZHENG_QUANT_DATES_DAY_COUNTER_HPP_20080808__

#include <zzheng/quant/dates/config.hpp>
#include <zzheng/quant/dates/basis.hpp>

namespace zzheng {
namespace quant {
namespace dates {

    class date;
    class calendar;

    class day_counter {

    public:

        explicit day_counter(basis_t basis);

        // Use auto-generated copy constructor.
        // Use auto-generated copy assignment.
        // Use auto-generated destructor.

        basis_t basis() const;

        double operator()(const date& start, const date& end, const calendar& cal) const;

        double year_fraction(const date& start, const date& end, const calendar& cal) const;

    private:

        basis_t basis_;

    }; // class day_counter

} // namespace zzheng::quant::dates
} // namespace zzheng::quant
} // namespace zzheng

#endif // ZZHENG_QUANT_DATES_DAY_COUNTER_HPP_20080808__



